#include"until.hpp"
#include<iostream>
#include<unistd.h>
using namespace std;

int main()
{
    char buffer[1024];
    Setnonblock(0);
    while(true)
    {
        printf(">>>>");
        fflush(stdout);
        ssize_t i=read(0,buffer,sizeof(buffer)-1);
        if(i>0)
        {
            buffer[i-1]=0;
            cout<<"echo# "<<buffer<<endl;
        }else if(i==0)
        {
            cout<<"read end"<<endl;
            break;
        }else{
            //...
        }
        sleep(1);
    }
    return 0;
}